<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.easidea.tim.service.saleorder.SaleOrderService"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrder"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrderItem"%>
<%@page import="com.easidea.tim.dao.saleorder.SaleOrderItemDao"%>
<%@page import="com.easidea.tim.service.saleorder.SaleOrderItemService"%>
<%
	String orderid =request.getParameter("orderid").toString();
	
	SaleOrderItemService saleOrderItemService = new SaleOrderItemService();
	WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());

	List itemList = ((SaleOrderItemService)wac.getBean("saleOrderItemService")).getItemsByOrderId(new Integer(orderid).longValue());
 %>
<?xml version="1.0" encoding="GB2312"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="订单填充">
	 <table columns="6" align="left">
	  <tr align="center">
	   <td>产品名称</td>
	   <td>产品色号</td>
	   <td>匹数</td>
	   <td>价格</td>
	   <td>操作</td>
	  </tr>
	  <%
	  	if(itemList !=null){
	  		for(int i =0;i<itemList.size();i++){
	  			SaleOrderItem saleOrder = (SaleOrderItem)itemList.get(i);

	   %>
	    <tr>
		   <td><%=saleOrder.getProductName() %></td>
		   <td><%=saleOrder.getProductColor() %></td>
		   <td><%=saleOrder.getPiNum()%></td>
		   <td><%=saleOrder.getMoneyNum() %></td>

		   <td>
		   <%
		   	if(saleOrder.getMeterNum().equals("0")){
		    %>
		   <a href="/tim/wap/com_detail_com.jsp?orderid=<%=saleOrder.getId() %>">填充</a>
		   <%
		   }else{
		    %>
		    已填充
		    <%
		    }
		     %>
		   
		   </td>
		  </tr>
	  <%
	 	 }
	 	 }
	   %>
	   <TR><TD> <a href="com_list.jsp">返回订单列表</a></TD></TR>
	 </table>
	</card>
	</wml>
 
